
//
//  SelectparameterResModel.swift
//  koolcar
//
//  Created by kuaimaxiansheng on 2023/10/13.
//

import UIKit
import Foundation
import ObjectMapper

class SelectparameterResModel: Mappable {
    var code: String?
    var msg: String?
    var data: SelectparameterDataModel?
    func mapping(map: Map) {
        code <- map["code"]
        msg <- map["msg"]
        data <- map["data"]
    }
    required init?(map: Map) {
        
    }
}

class SelectparameterDataModel: Mappable {
    var selectparameter: SelectparameterModel?
    func mapping(map: Map) {
        selectparameter <- map["selectparameter"]
    }
    required init?(map: Map) {
        
    }
}

class SelectparameterModel: Mappable {
    var selectBrand: BrandSeriesListModel?  //选中的品牌
    var selectSeries: SeriesListModel? //选中的车系
    var selectSort: SortParamObj? //选中的排序
    
    var mileageMaxEn : Double?
    var mileageMinEn : Double?
    
    var mileageMax : Double?
    var mileageMin : Double?
    
    var priceMax : String?
    var priceMin : String?
    
//    var priceMaxShow : String?//用来展示的价格
//    var priceMinShow : String?
    var priceGroup: String?
    var index = 0
    
    var seatnumMax : Int?
    var seatnumMin : Int?
    var seatNum : Int?

    var yearMax : String?
    var yearMin : String?
    
    var brandId: NSInteger?//品牌id
    var seriesId: NSInteger?//车系id
    var carCategoryIds = ""//车型，多个车型逗号拼接
    
    var orderProperty = ""//0：售价，1：年份
    var ascOrDesc = ""//1：降序，否则升序
    
    var bodyCD: String = ""//海外车品牌
    var seriesName: String = ""
    var sellingPriceTypeCode: String = ""
    
    func mapping(map: Map) {
        seatNum <- map["seatNum"]
        sellingPriceTypeCode <- map["sellingPriceTypeCode"]
        seriesName <- map["seriesName"]
        bodyCD <- map["bodyCD"]
        mileageMax <- map["mileageMax"]
        mileageMaxEn <- map["mileageMaxEn"]
        mileageMin <- map["mileageMin"]
        mileageMinEn <- map["mileageMinEn"]
        priceMax <- map["priceMax"]
        priceMin <- map["priceMin"]
        seatnumMax <- map["seatnumMax"]
        seatnumMin <- map["seatnumMin"]
        yearMax <- map["yearMax"]
        yearMin <- map["yearMin"]
    }
    required init?(map: Map) {
        
    }
    init() {
        
    }
}


class SortParamObj: NSObject {
    var name: String?
    var orderProperty: String?
    var ascOrDesc: String?
    var id: String?
    
    init(id: String,
         aName: String,
         aOrderProperty: String,
         ascOrDesc: String) {
        self.id = id
        self.name = aName
        self.orderProperty = aOrderProperty
        self.ascOrDesc = ascOrDesc
    }
}
